let typeMap = new Map()
let tagMap = new Map()
let vueRefMap = new Map()
let refCount = 0;
function getDataByTypeAndTag(type,tag) {
    console.log(type + tag)
}
function countPlus() {
    refCount++;
    console.log(refCount)
}
function setTagMapWithAttrList(tag,attrList)
{
    // console.log('setTagMapWithAttrList')
    let tempMap = new Map()
    //使用FOR循环遍历会导致VUE实例进行完第一个实例生命周期函数后不再执行其他，具体原因未知，暂时采用foreach方式遍历
    attrList.forEach(function(val,index,arr) {
        tempMap.set(val,1)
    });
    tagMap.set(tag,tempMap)
}

function getTagDataByTag(tag)
{
    return tagMap.get(tag)
}

function addToVueRefMap(tag,vueRef)
{
    vueRefMap.set(tag,vueRef)
}
countPlus()
getDataByTypeAndTag('test','onload')

define(function(require, exports,module) {
    'use strict';
    module.exports = {
        typeMap,
        tagMap,
        refCount,
        vueRefMap,
        setTagMapWithAttrList,
        getTagDataByTag,
        addToVueRefMap
    }
});